/***************************************************************************
 *   Copyright (C) 2007 by Eduardo Robles Elvira   *
 *   edulix@gmail.com   *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/

#ifndef KONNTRACKWIDGET_H
#define KONNTRACKWIDGET_H

#include <QVector>
#include <libnetfilter_conntrack/libnetfilter_conntrack.h>
#include <libnetfilter_conntrack/libnetfilter_conntrack_tcp.h>
#include "ui_konntrackbase.h"
#include "common.h"
#include "konntrackitem.h"

class QDomElement;
class QDomNode;
class QVariant;
class QModelIndex;
class QItemSelectionModel;
class QSortFilterProxyModel;

/**
 * This widget is the main visual part of the program. It inherits a form
 * which contains both the list of events and the list of conntracks. The main
 * reason why it subclass the Form is because we set the models and some other
 * properties of the list wisgets in the constructor.
 */
class KonntrackWidget : public QWidget, private Ui::Form
{
	Q_OBJECT
	friend class EventsThread;
	
	public:
		/*$PUBLIC_FUNCTIONS$*/
		KonntrackWidget(QWidget* parent = 0, Qt::WFlags fl = 0 );
		~KonntrackWidget();

	public slots:
		/*$PUBLIC_SLOTS$*/

	protected:
		/*$PROTECTED_FUNCTIONS$*/

	protected slots:
		/*$PROTECTED_SLOTS$*/
	
	protected:
		QSortFilterProxyModel *konntracksProxy, *eventsProxy;

};


#endif

